function [x,path]=ssg_nag(gobj,init,theta)
iter=1e5;
randn('seed',0);
v1=init;
dim=length(init);
v2=v1+randn(dim,1);

path=zeros(dim,iter);
for i=1:iter
    a=1/(i+3)^(8/9)/2;
    x=(1+theta)*v2-v1*theta;
    v1=v2;    
    v2=x-a*gobj(x);
    path(:,i)=v2;
end
